// 聊天主题定义
export interface ChatTheme {
  id: string;
  name: string; // 主题名称
  chatBackground: string; // 聊天背景色（渐变）
  myMessageBg: string; // 我发送的消息背景色
  friendMessageBg: string; // 好友发送的消息背景色
  messageTextColor: string; // 消息文字颜色
  fontFamily: string; // 字体
}

// 定义几套固定的主题
export const chatThemes: ChatTheme[] = [
  // 默认主题
  {
    id: "default",
    name: "默认主题",
    chatBackground: "white",
    myMessageBg: "#95ec69",
    friendMessageBg: "#a0cfff",
    messageTextColor: "#303133",
    fontFamily: "-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif"
  },
  // 蓝色海洋主题
  {
    id: "ocean",
    name: "蓝色海洋",
    chatBackground: "linear-gradient(to bottom, #e0f7ff, #f5fdff)",
    myMessageBg: "#64c4ed",
    friendMessageBg: "#bae7ff",
    messageTextColor: "#0c2d48",
    fontFamily: "'Noto Sans SC', sans-serif"
  },
  // 粉色梦幻主题
  {
    id: "pink",
    name: "粉色梦幻",
    chatBackground: "linear-gradient(to bottom, #ffe6f2, #fff9f9)",
    myMessageBg: "#ffb6c1",
    friendMessageBg: "#ffd1dc",
    messageTextColor: "#4d4d4d",
    fontFamily: "'Comic Sans MS', cursive, sans-serif"
  },
  // 绿色自然主题
  {
    id: "nature",
    name: "绿色自然",
    chatBackground: "linear-gradient(to bottom, #efffef, #f8fff8)",
    myMessageBg: "#c1e1c1",
    friendMessageBg: "#d7f5d7",
    messageTextColor: "#2e4e2e",
    fontFamily: "'Verdana', Geneva, sans-serif"
  },
  // 暖色主题
  {
    id: "warm",
    name: "暖色舒适",
    chatBackground: "linear-gradient(to bottom, #fff8e6, #fffbf5)",
    myMessageBg: "#ffdd99",
    friendMessageBg: "#ffe6b3",
    messageTextColor: "#663c00",
    fontFamily: "'Georgia', serif"
  }
];

// 获取主题通过ID
export const getThemeById = (themeId: string): ChatTheme => {
  const theme = chatThemes.find(theme => theme.id === themeId);
  return theme || chatThemes[0]; // 如果没找到，返回默认主题
}; 